// Broz and Plouffe 2010 IO

// Load original dataset
clear
use "BP2010 IO Rep Data.dta"

// REPLICATION
summarize
display c(k)
mdesc
tabmiss
codebook ifscode
gen gdppc = gdppc99_1k*1000
summarize

*Table 4, Model 1*
oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn, cl(ifscode)
summarize infl sal_pct size_f act_mfg act_serv frk_yn exp_yn
codebook ifscode if e(sample)

*Table 4, Model 2*
oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99, cl(ifscode)
mdesc infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99
codebook ifscode if e(sample)

*Table 4, Model 3*
oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  rfix99, cl(ifscode)
mdesc infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  rfix99
codebook ifscode if e(sample)

*Table 4, Model 4*
oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  lfix99, cl(ifscode)
mdesc infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  lfix99
codebook ifscode if e(sample)

*Table 4, Model 5*
oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  de99fix, cl(ifscode)
mdesc infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  de99fix
codebook ifscode if e(sample)

*Table 4, Model 6*
oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  rfix99  cbi_99_g inf_trgt2, cl(ifscode)
mdesc infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  rfix99  cbi_99_g inf_trgt2
codebook ifscode if e(sample)

// IMPUTATION
// m = 10
clear
use "BP2010 IO Imp Data.dta"
summarize
mi import flong, m(imp) id(case ifscode) imp(ff_99-gdppc99_1k)

set matsize 10000

*Table 4, Model 1*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn, cl(ifscode)
*Table 4, Model 2*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99, cl(ifscode)
*Table 4, Model 3*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  rfix99, cl(ifscode)
*Table 4, Model 4*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  lfix99, cl(ifscode)
*Table 4, Model 5*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  de99fix, cl(ifscode)
*Table 4, Model 6*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  rfix99  cbi_99_g inf_trgt2, cl(ifscode)

// m = 5
clear
use "BP2010 IO Imp Data 5.dta"
summarize
mi import flong, m(imp) id(case ifscode) imp(ff_99-gdppc99_1k)

set matsize 10000

*Table 4, Model 1*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn, cl(ifscode)
*Table 4, Model 2*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99, cl(ifscode)
*Table 4, Model 3*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  rfix99, cl(ifscode)
*Table 4, Model 4*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  lfix99, cl(ifscode)
*Table 4, Model 5*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  de99fix, cl(ifscode)
*Table 4, Model 6*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  rfix99  cbi_99_g inf_trgt2, cl(ifscode)

// m = 94
clear
use "BP2010 IO Imp Data 94.dta"
summarize
mi import flong, m(imp) id(case ifscode) imp(ff_99-gdppc99_1k)

set matsize 11000

*Table 4, Model 1*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn, cl(ifscode)
*Table 4, Model 2*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99, cl(ifscode)
*Table 4, Model 3*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  rfix99, cl(ifscode)
*Table 4, Model 4*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  lfix99, cl(ifscode)
*Table 4, Model 5*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  de99fix, cl(ifscode)
*Table 4, Model 6*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  rfix99  cbi_99_g inf_trgt2, cl(ifscode)

// HD
clear
use "BP2010 IO Imp Data HD.dta"
summarize
mi import flong, m(imp) id(case ifscode) imp(ff_99-gdppc99_1k)

set matsize 10000

*Table 4, Model 1*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn, cl(ifscode)
*Table 4, Model 2*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99, cl(ifscode)
*Table 4, Model 3*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  rfix99, cl(ifscode)
*Table 4, Model 4*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  lfix99, cl(ifscode)
*Table 4, Model 5*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  de99fix, cl(ifscode)
*Table 4, Model 6*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  rfix99  cbi_99_g inf_trgt2, cl(ifscode)

// MICE
clear
use "BP2010 IO Imp Data MICE.dta"
summarize
mi import flong, m(imp) id(case ifscode) imp(ff_99-gdppc99_1k)

set matsize 10000

*Table 4, Model 1*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn, cl(ifscode)
*Table 4, Model 2*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99, cl(ifscode)
*Table 4, Model 3*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  rfix99, cl(ifscode)
*Table 4, Model 4*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  lfix99, cl(ifscode)
*Table 4, Model 5*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  de99fix, cl(ifscode)
*Table 4, Model 6*
mi estimate, post: oprobit infl sal_pct size_f act_mfg act_serv frk_yn exp_yn volm9698 gdppc99_1k dgdppc_99 ff_99  rfix99  cbi_99_g inf_trgt2, cl(ifscode)

